<template>
  <div class="dashboard-container">
    <!-- <component :is="currentRole" /> -->
    <div class="home-container">Newly~~用户管理平台</div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import adminDashboard from './admin'
import editorDashboard from './editor'

export default {
  name: 'Dashboard',
  components: { adminDashboard, editorDashboard },
  data() {
    return {
      currentRole: 'adminDashboard'
    }
  },
  computed: {
    ...mapGetters([
      'roles'
    ])
  },
  created() {
    if (!this.roles.includes('admin')) {
      this.currentRole = 'editorDashboard'
    }
  }
}
</script>
<style lang="scss" scoped>
  .home-container {
    height: 100%;
    width: 100%;
    min-height: 540px;
    font-size: 40px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
  }
</style>
